<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cat_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cat_id" data-rule="required" readonly data-source="wdsxh/member_unit_cat/index" class="form-control selectpage" name="row[cat_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Level_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-level_id" data-rule="required" readonly data-source="wdsxh/member_unit_level/index" class="form-control selectpage" name="row[level_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Member_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-member_id" data-rule="required" data-source="wdsxh/member/index" class="form-control selectpage" name="row[member_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_name" data-rule="required" class="form-control" name="row[company_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_logo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-company_logo" class="form-control" size="50" name="row[company_logo]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-company_logo" class="btn btn-danger faupload" data-input-id="c-company_logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-company_logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-company_logo" class="btn btn-primary fachoose" data-input-id="c-company_logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-company_logo"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-company_logo"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_principal')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_principal" data-rule="required" class="form-control" name="row[company_principal]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_post')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_post" data-rule="required" class="form-control" name="row[company_post]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">公司标签:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[label]" data-template="label">
                <dd>
                    <ins>标签名</ins>
                    <ins>标签信息</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append hide"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[label]" class="form-control hide" cols="30" rows="5">{"0":"","1":"","2":""}</textarea>
            </dl>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-company_images" data-rule="required" class="form-control" size="50" name="row[company_images]" type="textarea">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-company_images" class="btn btn-danger faupload" data-input-id="c-company_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-company_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-company_images" class="btn btn-primary fachoose" data-input-id="c-company_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-company_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-company_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">公司简介:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-company_brief" data-rule="required" class="form-control" name="row[company_brief]"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_introduce')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-company_introduce" data-rule="required" class="form-control editor" rows="5" name="row[company_introduce]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_product')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-company_product" data-rule="required" class="form-control editor" rows="5" name="row[company_product]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_mobile" data-rule="required" class="form-control" name="row[company_mobile]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_address" data-toggle="city-picker" data-rule="required" class="form-control" name="row[company_address]" type="text">
            <input id="c-company_address_detail" placeholder="输入详细地址" data-rule="required" class="form-control" name="row[company_address_detail]" type="text">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Company_address')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-company_address" data-rule="required" class="form-control" name="row[company_address]" type="text">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">位置坐标:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <div class="input-group-addon">
                    经度
                </div>
                <input id="c-lng" data-rule="required" readonly class="form-control" name="row[company_address_lng]" type="number" value="">
                <div class="input-group-addon">
                    纬度
                </div>
                <input id="c-lat" data-rule="required" readonly class="form-control" name="row[company_address_lat]" type="number" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="sel-location" data-toggle="addresspicker" data-lat-id="c-lat" data-lng-id="c-lng" class="btn btn-danger sel-location" data-input-id="" ><i class="fa fa-map-marker"></i> {:__('选择坐标')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lng"></span>
                <span class="msg-box n-right" for="c-lat"></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_site')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_site" class="form-control" name="row[company_site]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_email" class="form-control" name="row[company_email]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/html" id="label">
    <dd class="form-inline">
        <input type="text" disabled class="form-control" value="标签<%=index+1%>" size="10">
        <input type="text" name="row[label_data][<%=index+1%>]" class="form-control" value="" maxlength="6" size="15">
        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
    </dd>
</script>